package com.fastloan.mgt.product.label.controller;

import com.fastloan.mgt.product.label.service.LabelService;
import com.kawins.result.ResultTo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenkai
 * createTime 2017-12-2017/12/27 15:59
 */
@RestController
@RequestMapping("/api/web/label")
public class LabelController {
    @Autowired
    private LabelService labelService;

    @RequestMapping
    public ResultTo all() {
        return new ResultTo().setData(labelService.selectAll());
    }

    @GetMapping("/temp")
    public ResultTo getLabel(String ids){
        return new ResultTo().setData(labelService.queryByIdS(ids));
    }
}
